const a = function (_, { data: items }) {
  if (!items.length) return {};
  return {
    tooltip: { trigger: "item", formatter: "{a} <br/>{b} : {c} ({d}%)" },
    legend: {
      orient: "vertical",
      left: "left",
      data: items.map((i) => i.name + ""),
    },
    grid: { containLabel: true, top: 80, left: 20, right: 20, bottom: 20 },
    series: [
      {
        name: "利率占比",
        type: "pie",
        radius: "55%",
        center: ["50%", "60%"],
        data: items,
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: "rgba(0, 0, 0, 0.5)",
          },
        },
      },
    ],
  };
};
